package com.lucas.demo.abstractfactory;

import com.lucas.demo.factory.Shape;

/**
 * @author Lucas
 * @date 2021/7/28 下午5:18
 */
public class ColorFactory extends AbstractFactory {

    @Override
    public Color getColor(String color) {
        if(color.equalsIgnoreCase("RED")){
            return new Red();
        } else if(color.equalsIgnoreCase("BLUE")){
            return new Blue();
        }
        return null;
    }

    @Override
    public Shape getShape(String shape) {
        return null;
    }
}
